Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the "battery" key to the home-assistant MQTT script #2595

Closed
wants to merge 7 commits into from

Conversation

triplepoint
Copy link
Contributor

The Inkbird sensor in src/devices/inkbird_ith20r.c reports "battery", but it doesn't exist in the MQTT field mapping in examples/rtl_433_mqtt_hass.py. This PR fills in that field mapping.

@gdt
Copy link
Collaborator

gdt commented Aug 12, 2023

Your commits could use squashing or rebasing, it looks like from the messages. That's just me; other people are fine with that happening on merge.

If this is the first battery, I think it's important to figure out how to align rtl_433s's ideas of battery and HA's, so that these are well-behaved battery entities when they land. Perhaps you did that and I'll have a look. Historically there have been multiple kinds of representations in rtl_433, much more cleaned up now.

@merbanan
Copy link
Owner

Why not change inkbird_ith20r.c instead ? I think that is the correct change to do.

@zuckschwerdt
Copy link
Collaborator

zuckschwerdt commented Aug 12, 2023

Yes, please fix inkbird_ith20r.c (you can reuse this PR if you like). I don't know how this slipped through the key needs to be battery_ok (https://triq.org/rtl_433/DATA_FORMAT.html#common-device-data) and the range is 01, I think here we need to divide by 100.0?

Also mic needs to be the last key. Shuffle that down in both data_make() and output_fields.

@triplepoint
Copy link
Contributor Author

ok, let's abandon this PR in favor of this one #2596

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants